﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Data.OleDb;
using System.Web.Configuration;
public partial class Registracija : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string hashedPassword = MySecurity.Program.HashLogin(txtUserName.Text, txtPassword.Text);
        BankaReference.Banka bank = new BankaReference.Banka();

        tab1.Visible = false;
        if (bank.insertNewPlayer(txtUserName.Text, 0, hashedPassword))
        {
            Label1.Text = "Вашата регистрација беше успешна!";
        }
        else
        {
            Label1.Text = "Вашата регистрација не е успешна!";
        }
    }
}